package cn.cmvideo.springboot.poms.listener;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

public class Listener1002742 implements MessageListener
{
	ExecutorService executor = Executors.newFixedThreadPool(10);

	@Override
	public void onMessage(Message message)
	{
		executor.execute(() -> {
			try
			{
				System.out.println("1002742，接收线程..." + Thread.currentThread().getName() + "收到的消息是："
						+ ((TextMessage) message).getText());
			} catch (JMSException e)
			{
				e.printStackTrace();
			}
		});
	}

};